package com.demo.sbexample.exception;

import com.demo.sbexample.enums.ResultEnum;

public class SysException extends RuntimeException {
    private Integer code;

    public SysException(Integer code, String message){
        super(message);
        this.code = code;
    }

    public SysException(ResultEnum reslut){
        super(reslut.getMsg());
        this.code = reslut.getCode();

    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

}
